package services.common;

import models.common.entity.t_supervisor_audit;
import models.common.entity.t_supervisor_audit.AuditIteamType;
import models.common.entity.t_supervisor_audit.AuditResult;
import services.base.BaseService;

import common.utils.Factory;

import daos.common.SupervisorAuditDao;

/**
 * 管理员审核记录表
 *@author xiaojun
 *@version 2017-4-18 上午11:56:22
 */
public class SupervisorAuditService extends BaseService<t_supervisor_audit>{

	protected SupervisorAuditDao supervisorAuditDao=Factory.getDao(SupervisorAuditDao.class);
	
	public SupervisorAuditService(){
		supervisorAuditDao=Factory.getDao(SupervisorAuditDao.class);
		super.basedao = this.supervisorAuditDao;
	};
	/**
	 * 新增管理员审核操作结果
	 * @param type
	 * @param supervisor_id
	 * @param auditResult
	 * @param describe
	 * @return
	 *@author xiaojun
	 *@version 2017-4-18 上午11:56:22
	 */
	public boolean addSupervisorAudit(long cplid,AuditIteamType type,long supervisor_id,AuditResult auditResult,String describe,String supervisor_name){
		t_supervisor_audit t=new t_supervisor_audit();
		t.setType(type);
		t.data_id=cplid;		
		t.supervisor_id=supervisor_id;
		t.setAudit_result(auditResult);
		t.remark=describe;
		t.supervisor_name=supervisor_name;
		return supervisorAuditDao.save(t);
	}
	
	
}
